package com.bw.eureka.jpa.entity;

import javax.persistence.*;

/**
 * @author qpxbo
 */
@Entity
@Table(name = "user_card")
public class UserCardEntity {
    private int id;
    private String cardNo;
    private String front;
    private String back;


    private UserEntity userEntity;




    @OneToOne(mappedBy = "cardEntity")
    public UserEntity getUserEntity() {
        return userEntity;
    }

    public void setUserEntity(UserEntity userEntity) {
        this.userEntity = userEntity;
    }

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "card_no", nullable = true, length = 30)
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    @Basic
    @Column(name = "front", nullable = true, length = 255)
    public String getFront() {
        return front;
    }

    public void setFront(String front) {
        this.front = front;
    }

    @Basic
    @Column(name = "back", nullable = true, length = 255)
    public String getBack() {
        return back;
    }

    public void setBack(String back) {
        this.back = back;
    }

}
